.class public Lcom/teewoo/app/bus/util/ToastUtil;
.super Ljava/lang/Object;
.source "ToastUtil.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 9
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static showToast(Landroid/content/Context;I)V
    .locals 3
    .parameter "ctx"
    .parameter "contentId"

    .prologue
    const/4 v2, 0x0

    .line 39
    const/4 v1, 0x1

    invoke-static {p0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    .line 40
    .local v0, toast:Landroid/widget/Toast;
    const/16 v1, 0x10

    invoke-virtual {v0, v1, v2, v2}, Landroid/widget/Toast;->setGravity(III)V

    .line 41
    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 42
    return-void
.end method

.method public static showToastCenter(Landroid/content/Context;I)V
    .locals 3
    .parameter "ctx"
    .parameter "contentId"

    .prologue
    const/4 v2, 0x0

    .line 33
    const/4 v1, 0x1

    invoke-static {p0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    .line 34
    .local v0, toast:Landroid/widget/Toast;
    const/16 v1, 0x11

    invoke-virtual {v0, v1, v2, v2}, Landroid/widget/Toast;->setGravity(III)V

    .line 35
    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 36
    return-void
.end method

.method public static showToastWithImage(Landroid/content/Context;II)V
    .locals 5
    .parameter "ctx"
    .parameter "contentId"
    .parameter "imgId"

    .prologue
    const/4 v4, 0x0

    .line 17
    const/16 v3, 0x1388

    invoke-static {p0, p1, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v1

    .line 19
    .local v1, toast:Landroid/widget/Toast;
    const/16 v3, 0x11

    invoke-virtual {v1, v3, v4, v4}, Landroid/widget/Toast;->setGravity(III)V

    .line 21
    invoke-virtual {v1}, Landroid/widget/Toast;->getView()Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout;

    .line 22
    .local v2, toastView:Landroid/widget/LinearLayout;
    new-instance v0, Landroid/widget/ImageView;

    invoke-direct {v0, p0}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 23
    .local v0, image:Landroid/widget/ImageView;
    invoke-virtual {v0, p2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 24
    invoke-virtual {v2, v0, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V

    .line 25
    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    .line 26
    return-void
.end method
